Skip to content

Conversation

@antmendoza
Copy link
Contributor

@antmendoza antmendoza commented May 15, 2021

Many thanks for submitting your Pull Request ❤️!

What this PR does / why we need it:
Provide support to the specification main branch

Special notes for reviewers:

I understand that the sdk has to evolve with the specification, so we should be able to generate the code from the main branch.

Should wee publish snapshot version to npmjs registry?

the think is that npmjs does not allow overwrite packages (as maven does) so once one version is published there is no rollback. (I have already messed up things here.. )

Related found documentation

Additional information (if needed):

@antmendoza antmendoza requested review from JBBianchi and tsurdilo May 15, 2021 11:24
@antmendoza antmendoza changed the title wip support specification main branch May 15, 2021
@antmendoza antmendoza changed the title support specification main branch WIP support specification main branch May 15, 2021
@JBBianchi
Copy link
Member

I must admit I'm not familiar with the concept of snapshot versions, from what I understand it's like prerelease/rc versions? (I'll read a bit about it)

I think we should keep a consistant relation between the spec version and the package version, we can have multiple subversions at the same time.

For instance, let's say 0.6 is stable and 0.7 (main) is next, we can have 2 branches of the SDK, one with a 0.6.x package and one with 0.7.x package. Depending on the configuration, 0.6.x could be tagged as latest and 0.7.x could be tagged as next. Each branch of the project can have it's own independant schema registry URL configured in download-schemas.ts if needed.

One important note though, while porting the tests to the alternative approach` version, I noticed few problems. I think we should stabilize those before branching/handling multiple schemas versions

@tsurdilo
Copy link
Contributor

You can define the release strategy as you see best fit. If it helps some lets have a chat I could go over how we do it for the Java Sdk. Basic idea is to have release branches while "main" is indeed a "snapshot" which follows the specification "main" branch . But again that might not be the best strat for all Sdks.

@tsurdilo
Copy link
Contributor

tsurdilo commented May 15, 2021

the only requirement i think we need to have is to have ability to correspond a release with a spec version release. otherwise its really up to you guys to decide whats best approach :)

@antmendoza
Copy link
Contributor Author

agree about having releases branch,

I will ask for help if I need for sure,

I just was wondering about how to publish "wip/snapshot" versions, probably I am just overcomplicating things, let's keep it simple..

@antmendoza antmendoza closed this May 16, 2021
@JBBianchi
Copy link
Member

I think it's managed with tags. If I'm not mistaken, by default, if no version is specified when running npm install/publish, the latest tag will be used. So if when you want to publish an unstable/beta version, you'd just use a different tag when publishing/installing.

For instance:

  • package@1.0.0 latest
  • package@1.0.1 latest
  • package@1.0.2 latest
  • package@1.0.3 beta

Running npm install package will install 1.0.2 and npm install package@beta will install 1.0.3. Publishing a new version, 1.0.4 will make it latest so the next user to install without specifing a tag (or have a semver restriction in the package.json) will get 1.0.4. In other words, you don't get the beta version unless you explicitly ask for it.

@antmendoza antmendoza deleted the pullschema-main_ branch June 16, 2021 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants